import { status } from '@/plugins/mate.js'
export const formConfig = [
    {
        name: 'label',
        type: 'input',
        placeholder: '菜单名称',
    },
    {
        name: 'name',
        type: 'input',
        placeholder: '菜单name',
    },
    {
        name: 'type',
        type: 'select',
        placeholder: '菜单级别',
        options: [
            { label: '一级菜单', value: 1 },
            { label: '二级菜单', value: 2 },
            { label: '三级菜单', value: 3 },
            { label: '四级菜单', value: 4 },
        ],
    },
]

export const config = [
    {
        name: 'name',
        type: 'input',
        label: 'name',
        placeholder: '请输入菜单name',
        required: true,
    },
    {
        name: 'label',
        type: 'input',
        label: '菜单名称',
        placeholder: '请输入菜单名称',
        required: true,
    },
    {
        name: 'icon',
        type: 'input',
        label: '菜单icon',
        placeholder: '请输入icon',
        required: false,
    },
    {
        name: 'type',
        type: 'select',
        required: true,
        label: '菜单级别',
        placeholder: '请选择菜单级别',
        options: [
            { label: '一级菜单', value: 1 },
            { label: '二级菜单', value: 2 },
            { label: '三级菜单', value: 3 },
            { label: '四级菜单', value: 4 },
        ],
    },
    {
        name: 'parent',
        type: 'select',
        label: '父级菜单',
        placeholder: '请选择父级菜单',
        options: [],
    },
]

export const column = [
    {
        label: '菜单id',
        name: 'id',
    },
    {
        label: '菜单名称',
        name: 'label',
    },
    {
        label: '菜单name',
        name: 'name',
    },
    {
        label: '菜单级别',
        name: 'type',
    },
    {
        label: '父级名称',
        name: 'parent_label',
    },
    // {
    //     label: '报告状态',
    //     name: 'status',
    //     format: (val) => status.dirc[val],
    // },
    {
        title: '操作',
        name: 'action',
        width: '220',
        buttons: [
            {
                text: '编辑',
                click: (val) => {},
            },
            {
                text: '删除',
                click: (val) => {},
            },
        ],
    },
]
